package test07;

import java.util.*;

/**
 * 内容审核请求类
 */
public class ContentCheckRequest {
    private String contentId;
    private ContentType contentType;
    private Object contentData;
    private RiskLevel riskLevel;
    private Map<String, Object> metadata;
    private List<ProcessingRecord> processingHistory;

    public ContentCheckRequest(String contentId, ContentType contentType, Object contentData) {
        this.contentId = contentId;
        this.contentType = contentType;
        this.contentData = contentData;
        this.riskLevel = RiskLevel.LOW; // 默认低风险
        this.metadata = new HashMap<>();
        this.processingHistory = new ArrayList<>();
    }

    public void addProcessingRecord(ProcessingRecord record) {
        processingHistory.add(record);
    }

    public void setRiskLevel(RiskLevel riskLevel) {
        this.riskLevel = riskLevel;
    }

    // Getters
    public String getContentId() { return contentId; }
    public ContentType getContentType() { return contentType; }
    public Object getContentData() { return contentData; }
    public RiskLevel getRiskLevel() { return riskLevel; }
    public Map<String, Object> getMetadata() { return metadata; }
    public List<ProcessingRecord> getProcessingHistory() { return processingHistory; }

    @Override
    public String toString() {
        return String.format("内容审核请求[ID: %s, 类型: %s, 当前风险: %s]",
                contentId, contentType, riskLevel);
    }
}

